//
//  smartImage.h  ll
//  Test01
//
//  Created by Storm Christoph on 10/30/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
@class Card;

@protocol CardDelegate

-(BOOL)cardShouldFlip:(Card *)card;
-(void)cardFlipped:(Card *)card;

@end



@interface Card : UIView {
	CGPoint startLocation;
	UIImageView *frontImageView;
	UIImageView *backImageView;
	
	id delegate;							// delegate for flip action
	
	int cardID;
	int groupID;
	BOOL isFlipped;
}

- (id)initWithFrame:(CGRect)frame frontImage:(UIImage*)frontImg  backImage:(UIImage *)backImg gameCardID:(int)cID gameGroupID:(int)gID;
- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event;
- (void) touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event;

- (void) testFunkt:(int)test;
- (void) doFlip;

- (IBAction)flipAction:(id)sender;
- (IBAction)askController;
- (IBAction)notifyController;


@property (nonatomic,assign) id delegate;	// that the delegate has a getter and setter
@property (nonatomic,assign) int cardID;	// id of the card
@property (nonatomic,assign) int groupID;	// id of the group of cards
@property (nonatomic,assign) BOOL isFlipped;
@end
